
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@sp-api-sdk/auth
Advanced tools
@sp-api-sdk/auth
Package for simplifying authentication with Selling Partner API
yarn add @sp-api-sdk/auth
npm install @sp-api-sdk/auth
With Security Token Service :
import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
const auth = new SellingPartnerApiAuth({
clientId: '',
clientSecret: '',
refreshToken: 'Atzr|...',
accessKeyId: '',
secretAccessKey,
role: {
arn: roleArn,
sessionName: 'SellingPartnerAPI'
},
})
const accessToken = await auth.accessToken.get()
const { AccessKeyId, SecretAccessKey, SessionToken } = await auth.getCredentials()
With an AWS user :
import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
const auth = new SellingPartnerApiAuth({
clientId: '',
clientSecret: '',
refreshToken: 'Atzr|...',
accessKeyId: '',
secretAccessKey,
user: {
AccessKeyId: '',
SecretAccessKey: ''
}
})
const accessToken = await auth.accessToken.get()
const { AccessKeyId, SecretAccessKey } = await auth.getCredentials()
Everytime you get the access token, the class will check before if the token has already been fetch or if it's still valid, if not, it will fetch it.
Same for the given credentials from Security Token Service
FAQs
Amazon Selling Partner API authentication package
The npm package @sp-api-sdk/auth receives a total of 414 weekly downloads. As such, @sp-api-sdk/auth popularity was classified as not popular.
We found that @sp-api-sdk/auth demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.